<template>
    <div class="pagination m_flex_box flex_vc flex_he">
      <el-pagination  background  @current-change="handleCurrentChange"
                    :current-page="page"
                    layout="total,prev, pager, next" :total="total" :page-size="pageSize" v-if="total">
    </el-pagination>
    </div>
  </template>
  
  <script>
    export default {
      props: {
        total: {
          type: Number
        },
        page:{
          type:Number
        },
        pageSize:{
          type:Number
        },
      },
      methods: {
        // 当前页码变更
        handleCurrentChange(val) {
          this.$emit('pageChange', {page:val});
        }
      }
    }
  </script>
  <style scoped lang="scss">
  .pagination{
    padding: 15px 0;
    text-align: right;
  }
  </style>